<template>
  <gui-page :customHeader="true">
    <template v-slot:gHeader>
      <view class="header">
        <image
          class="header-back"
          src="/static/activity/fanhui btn@2x.png"
          mode="aspectFit"
          @click="goBack"
        ></image>
        <text class="header-title">{{ title }}</text>
        <view style="width: 50rpx"></view>
      </view>
    </template>
    <template v-slot:gBody>
      <view class="line" style="height: 88rpx"></view>
      <Collect style="margin-top: 20rpx"></Collect>
    </template>
  </gui-page>
</template>

<script>
import Collect from "/pages/my/my_compoments/collect.vue";
import GuiPage from "@/Grace6/components/gui-page.vue";
import commonMixin from "@/mixin/commonMinxin";

export default {
  mixins: [commonMixin],
  components: {
    GuiPage,
    Collect,
  },
  data() {
    return {
      title: "我的收藏",
    };
  },
  methods: {
    goBack() {
      switch (uni.getSystemInfoSync().platform) {
        case "android":
          window.AndroidBridge.backEvent();
          console.log("运行Android上");
          break;
        case "ios":
          window.webkit.messageHandlers.backEvent.postMessage({});
          break;
        default:
          console.log("运行在开发者工具上");
          break;
      }
    },
  },
};
</script>

<style lang="scss" scoped>
.header {
  height: 88rpx;
  width: 750rpx;
  background-color: #fff;
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20rpx;

  .header-back {
    width: 50rpx;
    height: 50rpx;
  }

  .header-title {
    height: 88rpx;
    line-height: 88rpx;
    font-size: 32rpx;
    font-weight: bold;
    color: #333;
    flex: 1;
    text-align: center;
  }
}
</style>
